package com.kelvin.paopao.injector.modules;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.kelvin.paopao.adapter.MainDateListAdapter;
import com.kelvin.paopao.injector.PerFragment;
import com.kelvin.paopao.module.base.IBasePresenter;
import com.kelvin.paopao.module.main.date.datelist.IMainDateListPresenter;
import com.kelvin.paopao.module.main.date.datelist.MainDateListFragment;
import com.kelvin.paopao.module.main.date.datelist.MainDatePresenter;

import dagger.Module;
import dagger.Provides;

/**
 * Created by MCK on 2017/5/10.
 */

@Module
public class MainDateModule {
    private MainDateListFragment mView;

    public MainDateModule(MainDateListFragment view){
        this.mView=view;
    }

    @PerFragment
    @Provides
    public IMainDateListPresenter providePresenter(){
        return new MainDatePresenter(mView);
    }

    @PerFragment
    @Provides
    public BaseQuickAdapter provideAdapter(){
        return new MainDateListAdapter(mView.getContext());
    }
}
